package com.chance.cc.crawler.development.command.schedule.zhaoshang;

import com.chance.cc.crawler.development.command.schedule.CrawlerJobScheduleCommand;

/**
 * @Author Zhao.Hhuan
 * @Date Create in 2020/12/16 17:28
 * @Description
 *      招商
 **/
public class ZhaoshangCrawlerJobSchedule {


    private static CrawlerJobScheduleCommand crawlerJobScheduleCommand =
            new CrawlerJobScheduleCommand("192.168.1.215",9589);


    public static void main(String[] args) {

//        deleteCrawlerJob("moe-realtime-cron");
        repubflishCrawlerJobInfo("zhaoshang-industrialChain-realtime-simple");
        repubflishCrawlerJobInfo("zhaoshang-associationPage-realtime-simple");
        repubflishCrawlerJobInfo("zhaoshang-biddingReprot-realtime-simple");
        repubflishCrawlerJobInfo("zhaoshang-internalExhibit-realtime-simple");
        repubflishCrawlerJobInfo("zhaoshang-investmentReport-realtime-simple");
        repubflishCrawlerJobInfo("zhaoshang-newsReport-realtime-simple");
        repubflishCrawlerJobInfo("zhaoshang-patentPage-realtime-simple");
        repubflishCrawlerJobInfo("zhaoshang-talentRadar-realtime-simple");
        repubflishCrawlerJobInfo("zhaoshang-themeList-realtime-simple");

    }

    /**
     * 重新发布调度
     * @param triggerKey
     */
    public static void repubflishCrawlerJobInfo(String triggerKey){
        crawlerJobScheduleCommand.republishCrawlerJob(triggerKey,"crawler_dev_host");
    }

    /**
     * 去除调度
     * @param triggerKey
     */
    public static void deleteCrawlerJob(String triggerKey){
        crawlerJobScheduleCommand.deleteCrawlerJob(triggerKey,"crawler_dev_host");
    }

}
